<?php
namespace app\admin\controller\v1;

use app\admin\validate\CreatePermission;
use app\common\model\Permission as PermissionModel;


class Permission extends BaseController
{
    public function createOne(){
        //验证
        $validate = new CreatePermission();
        $validate->goCheck();
        $data = $validate->request->post();
        PermissionModel::createOne($data);
        return successReturn();

    }
    public function deleteOne($id){
        PermissionModel::deleteOne($id);
        return successReturn();
    }

}
